package com.gxa.mapper.zls;

import com.gxa.pojo.Customer;
import com.gxa.pojo.Customer_Contact_Peroson_Info;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: 周林森
 * Date: 2021/12/06 09:01:19
 * Description: 客户SQL
 * Version: V1.0
 */
public interface CustomerMapper {

    //添加客户基本信息
    int addCustomerInfo(Map customer);

    //添加客户联系人信息
    int addCustomerContactPeopleInfo(Map map);

    //通过编号判断客户是否存在
    String queryCustomerIdExist(Object customer_id);

    //查询客户
    List<Customer> queryCustomerList(Map map);

    //删除客户
    int delCustomerById(@Param(value = "id") Object id);

    //修改客户基本信息
    int updateCustomerBaseInfo(Map map);

    //修改客户联系人信息
//    int updateCustomerContactInfo(@Param("list") List<Customer_Contact_Peroson_Info> contactPerosonInfos);
    int updateCustomerContactInfo(Map contactPerosonInfo);

    //修改客户状态
    int updateCustomerStatus(@Param("status") String param,@Param("customer_id") Object customer_id);


    //查询客户对应联系人记录编号
    List<Integer> queryCusContactId(Object customer_id);

    //修改客户联系人信息  部分联系人删除
    int delContactById(@Param("array") Integer[] array,@Param("customer_id") Object customer_id);

    //添加联系人空数据
    int addContactNo(Object customer_id);
}
